<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/10/6 0006
  Time: 下午 1:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>资金统计</title>
    <script src="../../js/jquery-3.3.1.min.js" charset="utf-8"></script>
    <script src="../../js/cookie/jquery.cookie.js" charset="utf-8"></script>
    <script src="../../layui-v2.4.5/layui/layui.js" charset="utf-8"></script>
    <script src="/js/layui/form_verify.js"></script>
    <link rel="stylesheet" href="../../layui-v2.4.5/layui/css/layui.css" media="all">
    <style>
        table{
            border-collapse: collapse;
        }
        td{width:180px;padding:5px;border:1px solid black;}
        tr{display:block;}

    </style>
</head>
<body>

<div>

    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-right: 100px"  href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i>
    </a>
    开始时间：<input type="text" id="startDate">
    结束时间：<input type="text" id="endDate">
    
    <button class="layui-btn" style="margin-left: 5rem" onclick="search()">搜索</button>
    <script>
        function search() {
            window.location.href="/shop/statistics?startDate="+$("#startDate").val()+"&endDate="+$("#endDate").val();
        }

    </script>
</div>



<div style="margin-top: 1%">
    <table>
        <tr>
            <td><span>交易总笔数</span></td> <td><span>${statisticsInfo.count}</span></td>
            <td><span>交易总金额</span></td> <td><span>${statisticsInfo.allOrderMoney}</span></td>
            <td><span>返利总金额</span></td> <td><span>${statisticsInfo.allRebateMoney}</span></td>
            <td><span>剩余金额</span></td> <td><span>${statisticsInfo.residue}</span></td>

        </tr>
        <tr>
            <td><span>微信手续费</span></td> <td><span>${statisticsInfo.commissionMoney}</span></td>
            <td><span>充值金额</span></td> <td><span>${statisticsInfo.rechargeMoney}</span></td>
            <td><span>申请提现金额</span></td> <td><span>${statisticsInfo.applyMoney}</span></td>
            <td><span>已提现总金额</span></td> <td><span>${statisticsInfo.rechargeMoney}</span></td>
        </tr>
    </table>
</div>
<script>

    layui.use(['layer','laydate'], function(){
        var layer = layui.layer;
        var laydate=layui.laydate;
        laydate.render({
            elem: '#startDate'
            ,type: 'date' //默认，可不填
            ,value:'${startDate}'
        });
        laydate.render({
            elem: '#endDate'
            ,type: 'date' //默认，可不填
            ,value:'${endDate}'
        });
    });

    /*申请提现*/
    function withdraw() {
        layer.open({
            title:'申请提现',
            type: 2,
            content: '/marketing/goWithdrawLogin?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }
    /*返利记录*/
    function rebateLog() {
        layer.open({
            title:'申请提现',
            type: 2,
            content: '/marketing/moneyStatistics?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }


    /*提现记录*/

    function withdrawLog() {
        layer.open({
            title:'申请提现',
            type: 2,
            content: '/marketing/moneyStatistics?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }
</script>

</body>
</html>
